<<<<<<< .mine
﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using LogicUniversityBiz;

namespace LogicUniversity.Employee
{
    public partial class MakeRequestDetail : System.Web.UI.Page
    {
        protected void Page_PreInit(Object sender, EventArgs e)
        {
            //if (Session["Role"] as string != "Employee" || Session["Role"] as string != "Representative")
            //{
            //    
            //}
            if (Session["Role"] as string != "Employee")
            {
                if (Session["Role"] as string == "Representative")
                {
                    this.MasterPageFile = "~/Representative/RepMaster.Master";
                }
                else
                {
                    Response.Redirect("~/Login.aspx");
                }
            }

        }
        protected void Page_Load(object sender, EventArgs e)
        {
            
            if (!IsPostBack)
            {
               
                MakeRequestControl control=new MakeRequestControl();
                //retrieve it from Session
                lblEmpName.Text = control.getEmpName(Session["UserID"] as string);
                lblDate.Text = System.DateTime.Today.ToShortDateString();

                int reqID = Convert.ToInt32(Request.QueryString["reqID"]);
                List<RequisitionWithItemDetails> reqItems = control.getRequestedItemDetails(reqID);

                RequestedItemsView.DataSource = reqItems;
                RequestedItemsView.DataBind();
            }
        }
    }
}=======
﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using LogicUniversityBiz;

namespace LogicUniversity.Employee
{
    public partial class MakeRequestDetail : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                //retrieve it from Session
                MakeRequestControl control=new MakeRequestControl();
                lblEmpName.Text = "Win Min Myint";
                lblDate.Text = System.DateTime.Today.ToShortDateString();

                int reqID = Convert.ToInt32(Request.QueryString["reqID"]);
                List<RequisitionWithItemDetails> reqItems = control.getRequestedItemDetails(reqID);

                RequestedItemsView.DataSource = reqItems;
                RequestedItemsView.DataBind();
            }
        }
    }
}>>>>>>> .r28
